<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/pages/common/header.jsp"%>
<jdf:themeFile file="jquery.jqGrid.css"/>
<jdf:themeFile file="jqGrid/i18n/grid.locale-cn.js" />
<jdf:themeFile file="jqGrid/jquery.jqGrid.src.js" />
<jdf:themeFile file="business/bankStatement.js" />
</head>
<body>
	<div class="contentBody contentborder">
		<div class="tab-pane" id="tabPane">
			<div id="message">${message}</div>
			<div class="tab-page" id="tabPage1">
				<h1 class="tab">对账单</h1>
				<div class="contentborder tableForm">
					<jdf:form bean="entity" scope="request">
						<form action="${dynamicDomain}/bankStatement/save?action=${param.action}" method="post" id="Order">
							<input type="hidden" name="id">
							<input type="hidden" name="objectId">
							<input type="hidden" name="companyId">
							<input type="hidden" name="status">
							<input type="hidden" name="financeStatus" id="financeStatus">
							<input type="hidden" name="generateDate">
							<input type="hidden" name="makerUserId">
							<input type="hidden" name="payDate">
							<table class="inputTable">
							    <tr>
									<td class="label cancelBorderLeft" style="width: 100px;">
										<label for="purchaseId">采购单：</label>
									</td>
									<td class="content" colspan="3">
									   <input type="hidden" name="supplierId" id="supplierId">
										<input type="hidden" name="purchaseId" id="purchaseId">
										<input type="text" name="purchaseNo" id="purchaseNo" value="${purchaseNo}" size="70" readonly="readonly"/>
										<a href="${dynamicDomain}/purchase/selectToBankStatement?ajax=1&supplierId=${entity.supplierId}" class="colorbox">选择采购单</a>(已采购完成)
									</td>
								</tr>
								<tr>
								    <td class="label cancelBorderLeft">
                                        <label for="payment">付款方式：</label>
                                    </td>
                                    <td class="content" colspan="3">
                                        <input type="text" name="payment">
                                    </td>
                                 </tr>
                                 <tr>
                                    <td class="label cancelBorderLeft">
                                        <label for="sendDate">出货日期：</label>
                                    </td>
                                    <td class="content">
                                        <input type="text" name="sendDate" size="12" class="Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true,onpicked:function(dp){setDate($dp.$('payDate'), 60);}})">
                                    </td>
                                    <td class="label">
										<label for="predictPayDate">预计付款日期：</label>
									</td>
									<td class="content">
										<input type="text" name="predictPayDate" id="predictPayDate" size="12" class="Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})">
									</td>
								</tr>
                                 <tr>
                                    <td class="label cancelBorderLeft">
                                        <label for="currency">币种：</label>
                                    </td>
                                    <td class="content" colspan="3">
                                        <select name="currency">
                                            <option value=""></option>
                                            <jdf:select dictionaryId="1006"/>
                                        </select>
                                    </td>
								</tr>
								<tr>
                                    <td class="label cancelBorderLeft">
                                        <label for="earnest">定金：</label>
                                    </td>
                                    <td class="content" colspan="3">
                                       <input type="text" name="earnest">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="label cancelBorderLeft">
                                        <label for="remark">备注：</label>
                                    </td>
                                    <td class="content" colspan="3">
                                        <textarea rows="3" cols="30" name="remark"></textarea>
                                    </td>
                                </tr>
							</table>
						</form>
					</jdf:form>
					<div style="margin: 1px;">
						<table id="orderItemsTable"></table>
						<div id="pager"></div>
						<table id="orderChargeTable1"></table>
                        <div id="pager1"></div>
                        <table id="orderChargeTable2"></table>
                        <div id="pager2"></div>
					</div>
					<div class="right" style="margin: 2px;">
						<button type="button" onclick="$('#Order').submit();" class="submit_button">提交</button>
						<c:if test="${not empty message}">
						<button type="button" onclick="toUrl('${dynamicDomain}/bankStatement/create?action=${param.action}')">继续增加</button>
						</c:if>
						<c:choose>
							<c:when test="${param.action=='page'}">
								<button type="button" onclick="toUrl('${dynamicDomain}/bankStatement/back')">返回</button>
							</c:when>
							<c:otherwise>
								<button type="button" onclick="toUrl('${dynamicDomain}/bankStatement/${param.action}')">返回</button>
							</c:otherwise>
						</c:choose>
					</div>
				</div>
			</div>
		</div>
	</div>
	<jdf:tableLabelValidate domain="BankStatement"/>
	<script type="text/javascript">
	var bankStatementId = "${entity.objectId}";
	 var units = "";
     <c:forEach varStatus="num" var="item" items="${units}">
     units+="${item.value}:${item.name};";
     </c:forEach>
     units=units.substring(0,units.length-1);
	</script>
	
</body>
</html>